package com.mxx.common.generator.db;

import lombok.SneakyThrows;

import java.sql.Connection;
import java.sql.DriverManager;

;

public class MysqlDatabaseConnection implements DatabaseConnection {

    @SneakyThrows
    public MysqlDatabaseConnection() {
        Class.forName("com.mysql.cj.jdbc.Driver");
    }

    @Override
    @SneakyThrows
    public Connection connection(String url, String username, String password) {
        Connection connection = DriverManager.getConnection(url, username, password);
        return connection;
    }
}
